﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LevelEditor.Dao;


namespace LevelEditor.Objects.Tree
{
    public class BehaviorTreeNode
    {
        public enum NodeType
        {
            Selector, Sequence
        }

        private List<Trigger> behaviors;
        public List<Trigger> Behaviors
        {
            get { return behaviors; }
            set { behaviors = value; }
        }

        private Behavior currentBehavior;
        public Behavior CurrentBehavior
        {
            get { return currentBehavior; }
        }

        private int priority;
        public int Priority
        {
            get { return priority; }
            set { priority = value; }
        }

        private NodeType nodeType;
        public NodeType Type
        {
            get { return nodeType; }
            set { nodeType = value; }
        }

        private bool isrunning;
        public bool IsRunning
        {
            get { return isrunning; }
        }

        private bool isRoot;
        public bool IsRoot
        {
            get { return isRoot; }
            set { isRoot = value; }
        }

        public BehaviorTreeNode(NodeType t)
        {
            behaviors = new List<Trigger>();
            this.nodeType = t;
        }

        public void Execute()
        {

        }

        public void Stop()
        {
            isrunning = false;
        }

        public void Play()
        {
            isrunning = true;
        }

    }
}
